package com.hqyj.finance.server.invest.financeinvest.controller;

import com.hqyj.finance.server.invest.financeinvest.json.R;
import com.hqyj.finance.server.invest.financeinvest.service.UserFundService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

@RequestMapping("fund")
@RestController
public class FundIndexController {

    @Resource
    private UserFundService userFundService;

    @GetMapping("openIndexs")
    public R queryAllOpenFundIndexsRealInfo(){
        try{
            String result = userFundService.queryAllOpenFundIndexRealInfo();
            return R.success("查询开放式基金指数型基金信息成功！",result);
        }catch (Exception ex){
            ex.printStackTrace();
            return R.error("程序出现异常！");
        }
    }
}
